<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main">
    <g:set var="entityName" value="${message(code: 'orders.label', default: 'Orders')}"/>
    <title><g:message code="default.create.label" args="[entityName]"/></title>
</head>

<body>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><g:link controller="orders" action="index">Order</g:link></li>
            <li>Create Order</li>
        </ol>
    </div>
</div>
<g:if test="${flash.message}">
    <div class="alert alert-warning">
        <a href="#" class="close" data-dismiss="alert">
        &times;
        </a>
        <strong>${flash.message}</strong>
    </div>
</g:if>
<g:hasErrors bean="${ordersInstance}">
    <div class="row">
        <div class="container">
            <div class="alert alert-danger" role="alert">
                <ul class="errors" role="alert">
                    <g:eachError bean="${ordersInstance}" var="error">
                        <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                                error="${error}"/></li>
                    </g:eachError>
                </ul>
            </div>
        </div>
    </div>
</g:hasErrors>


<div class="row">
    <div class="container col-md-6 col-md-offset-3" style="width: 800px; ">
        <g:render template="/showCart" model="${[cart: cart]}"/>

        <div class="panel panel-primary"  >
        <div class="panel-heading" style="background-color: #222">创建订单</div>
            <div class="panel-body">
                <g:form url="[resource: ordersInstance, action: 'save']" class="form-horizontal">
                    <fieldset class="form">
                        <g:render template="form1"/>
                    </fieldset>
                    <fieldset class="buttons">
                        <g:submitButton name="create" class="btn btn-success btn-block"
                                        value="${message(code: 'default.button.create.label', default: 'Create')}"/>
                    </fieldset>
                </g:form>
            </div>
        </div>

    </div>
</div>
</body>
</html>
